home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 2031_CA-VB-95:07-lsof_private_data_cache.txt < prev    next >
Text File  |  1995-10-03  |  8KB  |  183 lines

  1. ======================================================================
  2. CERT Vendor-Initiated Bulletin VB-95:07
  3. September 28, 1995
  4.  
  5. Topic:  Directory and file vulnerability from lsof 3.18 through 3.43
  6. Source: Vic Abell (abe@cc.purdue.edu)
  7.  
  8. To aid in the wide distribution of essential security information, the CERT
  9. Coordination Center is forwarding the following information from Vic Abell,
  10. who urges you to act on this information as soon as possible.  Please contact
  11. Vic Abell if you have any questions or need further information.
  12.  
  13. ========================FORWARDED TEXT STARTS HERE============================
  14.  
  15. It may be possible to write lsof's private device cache file to
  16. system locations that are normally inaccessible to the lsof user,
  17. depending on the UNIX dialect where lsof is installed and how that
  18. dialect grants permission to access kernel memory information.
  19.  
  20. The vulnerability affects lsof revisions 3.18 through 3.43, installed
  21. on these UNIX dialects:
  22.  
  23.     AIX 3.2.4, 3.2.5, 4.1,      the IBM RISC/System 6000
  24.         4.1.1, and 4.1.2
  25.     EP/IX 2.1.1                 the CDC 4680
  26.     FreeBSD 1.1.5.1, 2.0, and   Intel-based systems
  27.         2.0.5
  28.     HP-UX 8.x, 9.x, and 10      HP systems (some combinations)
  29.     IRIX 4.0.5H, 5.2, 5.3,      SGI systems
  30.         6.0, and 6.1
  31.     Linux through 1.3.0         Intel-based systems
  32.     Motorola V/88 R32V3,        M88K systems
  33.         R40V4.[123]
  34.     NetBSD 1.0 and 1.0A         Intel and SPARC-based systems
  35.     NEXTSTEP 2.1 and 3.[0123]   all NEXTSTEP architectures
  36.     OSF/1 1.3, 2.0, 3.0, and    the DEC Alpha
  37.         3.2
  38.     RISC/os 4.52                MIPS R2000-based systems
  39.     SCO OpenDesktop or          Intel-based systems
  40.         OpenServer 1.1, 3.0,
  41.         and 5.0
  42.     Sequent Dynix 3.0.12        the Sequent Symmetry
  43.     Sequent PTX 2.1.[156] and   Sequent systems
  44.         4.0.[23]
  45.     Solaris 2.[1234] and 2.5    Sun 4 and i86pc systems
  46.         BETA
  47.     SunOS 4.1.[1234]            Sun 3 and 4
  48.     Ultrix 2.2, 4.2, 4.3,       DEC RISC and VAX
  49.         and 4.4
  50.  
  51. I recommend that users of the affected revisions of lsof on these
  52. dialects install lsof revision 3.44, 3.45 or later.  Section III
  53. describes its location and some appropriate installation considerations.
  54.  
  55. -----------------------------------------------------------------------------
  56.  
  57. I.   Description
  58.  
  59.      A private device cache file feature was introduced at lsof
  60.      revision 3.18 to speed up subsequent calls to lsof by reducing
  61.      the need for a full scan of the nodes in /dev (or /devices).
  62.      Accompanying the feature was an option (-D) that allowed the
  63.      lsof user to specify where the device cache file was to be
  64.      recorded.
  65.  
  66.      Since lsof normally runs with effective group ID permission
  67.      set to the group that can read kernel memory devices, the -D
  68.      option might allow lsof to write its device cache file to a
  69.      location not normally accessible to the real user or group
  70.      owning the lsof process.  The locations where the lsof device
  71.      cache file might be inappropriately recorded depend on the
  72.      group that owns the memory devices and to what other files
  73.      and directories the group has write permission.
  74.  
  75.      Here are two examples: 1) IBM's distribution of AIX sets group
  76.      ownership of /dev/kmem and /etc to the "system" group and
  77.      enables group write permission in /etc; and 2) Sun's Solaris
  78.      distribution does the same thing, using the "sys" group.
  79.  
  80.      (Security conscious installations often create a new group --
  81.      e.g., "kmem" or "mem" -- that owns no files and is used solely
  82.      for enabling read access to kernel memory devices.)
  83.  
  84.      A fix for this group ID vulnerability may be found in lsof
  85.      revisions 3.44, 3.45, and above.
  86.  
  87.      A more serious vulnerability exists when lsof must run setuid
  88.      to the root user and also has device cache file support.  This
  89.      happens for the lsof implementation that runs under Motorola's
  90.      V/88 UNIX dialects R40V4.1, R40V4.2, and R40V4.3.  This gives
  91.      the lsof user an unlimited choice of places to record the
  92.      device cache file.  A partial fix for this vulnerability was
  93.      introduced in lsof revision 3.43.  The complete fix may be
  94.      found in lsof revisions 3.44, 3.45, and above.
  95.  
  96. II.  Impact
  97.  
  98.      Unauthorized users may be able to write the lsof device cache
  99.      file to normally-restricted locations, possibly in place of
  100.      important system files.
  101.  
  102.      The vulnerability can be exploited only by users with a valid
  103.      account.  It cannot be exploited by arbitrary remote users.
  104.  
  105.      The vulnerability affects all lsof revisions 3.18 through 3.43
  106.      on UNIX dialects where device cache file support has been
  107.      implemented.
  108.  
  109. III. Solution
  110.  
  111.      Retrieve lsof revision 3.44, 3.45, or later and install it.
  112.  
  113.        Compressed tar archive:
  114.  
  115.          ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof.tar.Z
  116.  
  117.        Gzip'd tar archive:
  118.  
  119.          ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof.tar.gz
  120.  
  121.      Lsof 3.44 eliminates the vulnerability for all relevant UNIX
  122.      dialects.  However, its overly zealous restrictions for Solaris
  123.      and SunOS and are relaxed in revision 3.45.
  124.  
  125.      Both tar archives are wrappers that contain authentication
  126.      information (MD5 checksums and PGP certificates) and a tar
  127.      archive of the lsof sources.
  128.  
  129.      1.  Retrieve the wrapper archive, extract its three files --
  130.          README.lsof_<revision>, lsof_<revision>.tar, and
  131.          lsof_<revision>.tar.asc -- and verify its authentication
  132.          information.  (<revision> should be 3.44 or greater.)
  133.  
  134.      2.  Unpack the lsof source archive from lsof_<revision>.tar
  135.          and read its documentation files.  Pay particular attention
  136.          to the 00DCACHE file that describes options for specifying
  137.          the location of the device cache, and the security section
  138.          in the 00README file.
  139.  
  140.      3.  Having selected the lsof options appropriate to the UNIX
  141.          dialect where you want to install it, run the Configure
  142.          script, use make to build lsof, and install the resulting
  143.          lsof executable.
  144.  
  145. -----------------------------------------------------------------------------
  146.  
  147. Vic Abell appreciates the advice and comments provided by members
  148. of the bugtraq mailing list that led him to realize this vulnerability
  149. existed.  He thanks Katherine T. Fithen and Linda Hutz Pesante of the
  150. CERT Coordination Center for their help in preparing this bulletin.
  151.  
  152. =========================FORWARDED TEXT ENDS HERE=============================
  153.  
  154.  
  155. CERT publications, information about FIRST representatives, and
  156. other information related to computer security are available for anonymous
  157. FTP from info.cert.org.
  158.  
  159. CERT advisories and bulletins are also posted on the USENET newsgroup
  160. comp.security.announce. If you would like to have future advisories and
  161. bulletins mailed to you or to a mail exploder at your site, please send mail
  162. to cert-advisory-request@cert.org.
  163.  
  164. If you wish to send sensitive incident or vulnerability information to
  165. CERT staff by electronic mail, we strongly advise that the e-mail be
  166. encrypted.  The CERT Coordination Center can support a shared DES key, PGP
  167. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  168. CERT staff for details).
  169.  
  170. Internet email: cert@cert.org
  171. Telephone: +1 412-268-7090 (24-hour hotline)
  172.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  173.            and are on call for emergencies during other hours.
  174. Fax: +1 412-268-6989
  175.  
  176. CERT Coordination Center
  177. Software Engineering Institute
  178. Carnegie Mellon University
  179. Pittsburgh, PA 15213-3890
  180. USA
  181.  
  182. CERT is a service mark of Carnegie Mellon University.
  183.